<%
    String mode = request.getParameter("mode").toString();
    int num = Integer.parseInt(request.getAttribute("num_locali").toString());
    String loc = "";
    String cat = "";
    if (mode.equals("bylocality")) {
        loc = request.getParameter("loc").toString();
    } else {       //mode.equals("bycategory")
        cat = request.getParameter("cat").toString();
    }
%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="/WEB-INF/tlds/asportoonline.tld" prefix="asportoonline" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>AsportoOnline | I miei locali</title>
        <style type="text/css">
            @import url("style.css");
        </style>
    </head>
    <body>
        <div class="meister">
            <div class="page">
                <div class="container">
                    <%@ include file="/WEB-INF/common/header.jsp"%>
                    <div class="navigation"> <a id="first" href="MainController?q=index">Home</a> > I miei locali</div>  
                    <div class="uniform_background">
                        <div class="resultsArea">                         
                            <div class="listaLocali">
                                <% if (mode.equals("bylocality")) {%>

                                <h1><%=num%> locali trovati a <%=loc%></h1>

                                <% } else { //mode.equals("bycategory")%>

                                <h1><%=num%> locali trovati che offrono almeno un prodotto di tipo <%=cat%></h1>

                                <% }%>

                                <asportoonline:elenco_locali_ricercati locali="${lista_locali}" />
                            </div>
                        </div>
                    </div>
                    <%@ include file="/WEB-INF/common/footer.jsp"%>
                </div>
            </div>
        </div>        
    </body>
</html>
